package Entities;
// Generated Jun 21, 2009 1:07:04 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Rollen generated by hbm2java
 */
@Entity
@Table(name="rollen"
    ,catalog="pdlv2"
)
public class Rollen  implements java.io.Serializable {


     private Integer id;
     private String naam;
     private Set<Personen> personens = new HashSet<Personen>(0);

     /**
      *
      */
     public Rollen() {
    }

	
     /**
      *
      * @param naam
      */
     public Rollen(String naam) {
        this.naam = naam;
    }
    /**
     *
     * @param naam
     * @param personens
     */
    public Rollen(String naam, Set<Personen> personens) {
       this.naam = naam;
       this.personens = personens;
    }
   
    /**
     *
     * @return
     */
    @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id", unique=true, nullable=false)
    public Integer getId() {
        return this.id;
    }
    
     /**
      *
      * @param id
      */
     public void setId(Integer id) {
        this.id = id;
    }
    
     /**
      *
      * @return
      */
     @Column(name="naam", nullable=false, length=20)
    public String getNaam() {
        return this.naam;
    }
    
     /**
      *
      * @param naam
      */
     public void setNaam(String naam) {
        this.naam = naam;
    }
    /**
     *
     * @return
     */
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="rollen")
    public Set<Personen> getPersonens() {
        return this.personens;
    }
    
    /**
     *
     * @param personens
     */
    public void setPersonens(Set<Personen> personens) {
        this.personens = personens;
    }




}


